﻿IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'proc_cm_GetSermonSeriesByName')
BEGIN
    PRINT 'Dropping Procedure proc_cm_GetSermonSeriesByName'
    DROP  Procedure  proc_cm_GetSermonSeriesByName
END
GO

PRINT 'Creating Procedure proc_cm_GetSermonSeriesByName'
GO

CREATE PROCEDURE [dbo].[proc_cm_GetSermonSeriesByName]
	@pSeriesNm nvarchar(255)
AS
BEGIN
	SET NOCOUNT ON
	
	SELECT 
		[sermon_series_id]
		,[series_nm]
		,[series_image_url]
		,[detail_txt]
	FROM 
		[dbo].[tbl_sermon_series] (NOLOCK)
	WHERE
		[series_nm] = @pSeriesNm
END
GO

GRANT EXEC ON dbo.proc_cm_GetSermonSeriesByName TO PUBLIC
GO


